﻿<%@ Page Language="C#" MasterPageFile="~/GUIMaster.Master" AutoEventWireup="true" CodeBehind="publicStats.aspx.cs" Inherits="GUI.publicStats" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <link rel="stylesheet" href="stats/stats.css" type="text/css" />
    <script type="text/javascript" src="stats/stats.js"></script>
    
    <script type="text/javascript">
       
       language = '<asp:Literal ID="GraphLanguage" runat="Server" />';
       
       // Silverlight control's Id
       chartId = "<%=Xaml1.ClientID %>";
       
    </script> 
    
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentHomePage" runat="server">

    <h1>
        <asp:Literal Text="<%$ Resources:lblTitle %>" runat="Server" />
    </h1>
    
    
    <div id="statsMainContainer">
        
        <!-- Rounded border -->
        <div id="topLeftCorner"></div>
        <div id="topRightCorner"></div>
        <div id="bottomLeftCorner"></div>
        <div id="bottomRightCorner"></div>
        <div id="topBorder"></div>
        <div id="bottomBorder"></div>
        <div id="leftBorder"></div>
        <div id="rightBorder"></div>
        
        <!-- Arrows to scroll the content -->
        <div id="scrollLeft" class="disabled"></div>
        <div id="scrollRight"></div>
        
        <div id="statsViewport">
        
            <div id="slidingPanel">
            
                <div id="tableContainer">
                    
                    <div class="tableListContainer">
                        <img id="statsTableSavingsIcon" src="stats/resources/earth_icon.png" alt="" />
                        <ol id="statsTableSavings">
                            <li>
                                <span class="statsTableLabel"><asp:Literal Text="<%$ Resources:stlTotPollution %>" runat="Server" /></span>
                                <span><asp:Literal ID="stvTotPollution" runat="Server" /></span>
                                <span><asp:Literal Text="<%$ Resources:stlTotPollutionUOM %>" runat="Server" /></span>
                            </li>
                            <li>
                                <span class="statsTableLabel"><asp:Literal Text="<%$ Resources:stlTotFuel %>" runat="Server" /></span>
                                <span><asp:Literal ID="stvTotFuel" runat="Server" /></span>
                                <span>L</span>
                            </li>
                            <li>
                                <span class="statsTableLabel"><asp:Literal Text="<%$ Resources:stlTotMoney %>" runat="Server" /></span>
                                <span><asp:Literal ID="stvTotMoney" runat="Server" /></span>
                                <span>EUR</span>
                            </li>
                        </ol>
                    </div>
                    
                    <div class="tableListContainer">
                        <img id="statsTableTripsIcon" src="stats/resources/trip_icon.png" alt="" />
                        <ol id="statsTableTrips">
                            <li>
                                <span class="statsTableLabel"><asp:Literal Text="<%$ Resources:stlProposedTrip %>" runat="Server" /></span>
                                <span><asp:Literal ID="stvProposedTrip" runat="Server" /></span>
                                <span></span>
                            </li>
                            <li>
                                <span class="statsTableLabel"><asp:Literal Text="<%$ Resources:stlCompletedTrip %>" runat="Server" /></span>
                                <span><asp:Literal ID="stvCompletedTrip" runat="Server" /></span>
                                <span></span>
                            </li>
                        </ol>
                    </div>
                    
                    <div class="tableListContainer">
                        <img id="statsTableKmIcon" src="stats/resources/km_icon.png" alt="" />
                        <ol id="statsTableKm">
                            <li>
                                <span class="statsTableLabel"><asp:Literal Text="<%$ Resources:stlTotalKm %>" runat="Server" /></span>
                                <span><asp:Literal ID="stvTotalKm" runat="Server" /></span>
                                <span>Km</span>
                            </li>
                            <li>
                                <span class="statsTableLabel"><asp:Literal Text="<%$ Resources:stlAverageKm %>" runat="Server" /></span>
                                <span><asp:Literal ID="stvAverageKm" runat="Server" /></span>
                                <span>Km</span>
                            </li>
                        </ol>
                    </div>
                    
                    <div class="tableListContainer">
                        <img id="statsTablePassengersIcon" src="stats/resources/passengers_icon.png" alt="" />
                        <ol id="statsTablePassengers">
                            <li>
                                <span class="statsTableLabel"><asp:Literal Text="<%$ Resources:stlTotPassengers %>" runat="Server" /></span>
                                <span><asp:Literal ID="stvTotPassengers" runat="Server" /></span>
                                <span></span>
                            </li>
                            <li>
                                <span class="statsTableLabel"><asp:Literal Text="<%$ Resources:stlMaxPassengers %>" runat="Server" /></span>
                                <span><asp:Literal ID="stvMaxPassengers" runat="Server" /></span>
                                <span></span>
                            </li>
                            <li>
                                <span class="statsTableLabel"><asp:Literal Text="<%$ Resources:stlPassengersOnWay %>" runat="Server" /></span>
                                <span><asp:Literal ID="stvPassengersOnWay" runat="Server" /></span>
                                <span></span>
                            </li>
                        </ol>
                    </div>
                    
                    <div class="tableListContainer">
                        <img id="statsTableAppointmentsIcon" src="stats/resources/missed_icon.png" alt="" />
                        <ol id="statsTableAppointments">
                            <li>
                                <span class="statsTableLabel"><asp:Literal Text="<%$ Resources:stlMissedDrivers %>" runat="Server" /></span>
                                <span><asp:Literal ID="stvMissedDrivers" runat="Server" /></span>
                                <span></span>
                            </li>
                            <li>
                                <span class="statsTableLabel"><asp:Literal Text="<%$ Resources:stlMissedPassengers %>" runat="Server" /></span>
                                <span><asp:Literal ID="stvMissedPassengers" runat="Server" /></span>
                                <span></span>
                            </li>
                        </ol>
                    </div>
                    
                    <div class="tableListContainer">
                        <img id="statsTableSystemIcon" src="stats/resources/system_icon.png" alt="" />
                        <ol id="statsTableSystem">
                            <li>
                                <span class="statsTableLabel"><asp:Literal Text="<%$ Resources:stlRegUsers %>" runat="Server" /></span>
                                <span><asp:Literal ID="stvRegUsers" runat="Server" /></span>
                                <span></span>
                            </li>
                            <li>
                                <span class="statsTableLabel"><asp:Literal Text="<%$ Resources:stlUptime %>" runat="Server" /></span>
                                <span><asp:Literal ID="stvUptime" runat="Server" /></span>
                                <span><asp:Literal Text="<%$ Resources:stlUptimeUOM %>" runat="Server" /></span>
                            </li>
                        </ol>
                    </div>
                    
                </div>
            
                <div id="graphContainer">
            		
		            <div id="graphSelectors">
			            <ol>
			                <li><asp:Literal Text="<%$ Resources:gsSavedPollution %>" runat="Server" /> <input type="hidden" value="savedPollution" /></li>
				            <li><asp:Literal Text="<%$ Resources:gsSavedMoney %>" runat="Server" /> <input type="hidden" value="savedMoney" /></li>
				            <li><asp:Literal Text="<%$ Resources:gsSavedFuel %>" runat="Server" /> <input type="hidden" value="savedFuel" /></li>
				            <li><asp:Literal Text="<%$ Resources:gsRegisteredUsers %>" runat="Server" /> <input type="hidden" value="registeredUsers" /></li>
				            <li><asp:Literal Text="<%$ Resources:gsDailyTripProposed %>" runat="Server" /> <input type="hidden" value="dailyTripProposed" /></li>
				            <li><asp:Literal Text="<%$ Resources:gsDailyTripCompleted %>" runat="Server" /> <input type="hidden" value="dailyTripCompleted" /></li>
				            <li><asp:Literal Text="<%$ Resources:gsDoneKilometers %>" runat="Server" /> <input type="hidden" value="doneKilometers" /></li>
				            <li><asp:Literal Text="<%$ Resources:gsAverageTripKm %>" runat="Server" /> <input type="hidden" value="averageTripKm" /></li>
				            <li><asp:Literal Text="<%$ Resources:gsTotalPassengers %>" runat="Server" /> <input type="hidden" value="totalPassengers" /></li>
				            <li><asp:Literal Text="<%$ Resources:gsCarriedPassengers %>" runat="Server" /> <input type="hidden" value="carriedPassengers" /></li>
				            <li><asp:Literal Text="<%$ Resources:gsMaxPassengers %>" runat="Server" /> <input type="hidden" value="maxPassengers" /></li>
				            <li><asp:Literal Text="<%$ Resources:gsMissedAppointmentByDrivers %>" runat="Server" /> <input type="hidden" value="missedAppointmentByDrivers" /></li>
				            <li><asp:Literal Text="<%$ Resources:gsMissedAppointmentByPassengers %>" runat="Server" /> <input type="hidden" value="missedAppointmentByPassengers" /></li>
			            </ol>
		            </div>
            		
		            <div id="graphOptionsAndControlContainer">
            			
			            <div id="graphSilverlightControl">
			            
			                <div id="graphLoadingOverlay">
			                    <div id="graphLoadingIcon"></div>
			                </div>
			                
				            <asp:Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/StatsGraphs.xap" Version="2.0" Width="450px" Height="300px" OnPluginLoaded="onPluginLoaded" Windowless="true" />
				            
			            </div>
            			
			            <div id="graphOptions">
            				
				            <label>Mese:</label>
            				
				            <select id="graphMonth" disabled="disabled" >
					            <option value="0" selected="selected" > <asp:Literal Text="<%$ Resources:cbxEntireYear %>" runat="Server" /> </option>
					            <option value="1" > 1 </option>
					            <option value="2" > 2 </option>
					            <option value="3" > 3 </option>
					            <option value="4" > 4 </option>
					            <option value="5" > 5 </option>
					            <option value="6" > 6 </option>
					            <option value="7" > 7 </option>
					            <option value="8" > 8 </option>
					            <option value="9" > 9 </option>
					            <option value="10" > 10 </option>
					            <option value="11" > 11 </option>
					            <option value="12" > 12 </option>
				            </select>
            				
            				<span><!-- some space --></span>
            				
				            <label>Anno:</label>
            				
				            <select id="graphYear" disabled="disabled" ></select>
            				
			            </div>
            			
		            </div>
            		
	            </div>
    	    
	        </div>
	    
	    </div>
	    
	</div>
    
</asp:Content>
